

CurrentFeed = GetOemDRO(818)
DoSpinStop()

Cur = GetDro(0)
Move = Cur+20.0 	'The maximum depth of detection is 20.0
Offset = Abs(GetOEMDRO(1000))/(-2) 	'radius of the probe
Sal = Offset - 2.0 		'When tool setting is complete, leave 2.0

If GetOemLed (825)=0 Then
Code "G4 P2.5"
Code "G31 X"& Move & "F25"
While IsMoving()
Sleep(200)
Wend
Probepos = GetDro(0)
Call SetDro(0, Offset)
Code "G4 P1"
Code "G0 X" & Sal
Code "(X zeroed)"
Code "F" &CurrentFeed

Else
Code "(Check Ground Probe)"
End If

Exit Sub   